//
//  Funcation.h
//  929爱限免项目
//
//  Created by qianfeng on 15/9/29.
//  Copyright (c) 2015年 LiuQing. All rights reserved.
//

#import <Foundation/Foundation.h>

#import <UIKit/UIKit.h>

//对按钮，label等控件二次封装
typedef void(^AFSuccessCall)(id responseObject);

typedef void(^AFFailureCall)(id error);

@interface Funcation : NSObject

+(UIBarButtonItem *)setBarButtonItem:(NSString *)title andImageName:(NSString *)image callBack:(SEL)callback andTarget:(id)target;
+(void)getWithURL:(NSString *)url success:(AFSuccessCall)success andFail:(AFFailureCall)fail;
+(void)postWithURL:(NSString *)url paramters:(NSDictionary *)para success:(AFSuccessCall)success failure:(AFFailureCall)failure;

+ (NSURLSessionDataTask *)sendWeiboWithBlock:(void (^)(NSArray *posts, NSError *error))block andContent:(NSString*)content andImage:(UIImage*)image;

+(void)setNetIndicator:(BOOL)bl;
@end
